<template>
  <!-- 分类页面 -->
  <div>
    <van-sidebar v-model="activeKey">
      <van-sidebar-item
        v-for="item in categoryList"
        :key="item.id"
        :title="item.name"
      />
    </van-sidebar>
  </div>
</template>

<script>
import { GetCatalogNavData } from "@/request/api";
export default {
  data() {
    return { activeKey: 0, categoryList: [] };
  },
  created() {
    GetCatalogNavData().then((res) => {
      this.categoryList = res.data.categoryList;
    });
  },
};
</script>
 
<style lang = "less" scoped>
</style>